import Taro, { Component } from '@tarojs/taro'
import { View, Image } from '@tarojs/components'
import './index.scss'

export default class Activity extends Component {
   constructor(props) {
       super(props) 
           this.state={
               imgList:[
                   {index:0, imgUrl:'https://haitao.nos.netease.com/1c1mll0tg89_400_400.jpg?imageView&thumbnail=181x0&quality=90'},
                   {index:1, imgUrl:'https://haitao.nosdn1.127.net/isijdxsx56_400_400.jpg?imageView&thumbnail=181x0&quality=90'}
               ]
           
       }
   }

    componentWillMount () {
        // 请求接口数据
    }
    goDetail = () => {
        
    }

    render() {
        const { imgList } = this.state
        return (
            <View className="activity">
                {imgList && imgList.length && imgList.map((item, index) =>                    
                        <Image mode='widthFix' className='activity-img' src={item.imgUrl} onClick={this.goDetail}></Image>
                    )}
            </View>
        )
    }
}